(defun cat (stream)
  (awhile (read-line stream)
    (print it)
    (print "\n")))

(defun main (argv)
  (if (null? (cdr argv))
      (cat *stdin*)
    (let loop ((ls (cdr argv)))
         (unless (null? ls)
           (let1 strm (open (car ls))
             (cat strm)
             (close strm))
           (loop (cdr ls))))))
